/**
 * @Author wangyl
 * @E-mail wangyl0629@foxmail.com
 **/
package com.wyl.xue.admin.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wyl.xue.admin.system.mybatis.entity.SystemDepartment;
import com.wyl.xue.admin.system.vo.DepartmentInfoVo;
import com.wyl.xue.admin.system.vo.DepartmentTree;

import java.util.List;

public interface Department {
    /**
     * @Description 添加部门信息
     * @param departmentInfoVo
     * @return void
     * @Date 2020/11/8 17:20
     * @Author wangyl
     * @Version V1.0
     */
    void addDepartment(DepartmentInfoVo departmentInfoVo);

    /**
     * @Description 修改部门信息
     * @param systemDepartment
     * @return void
     * @Date 2020/11/8 17:21
     * @Author wangyl
     * @Version V1.0
     */
    void updateDepartment(SystemDepartment systemDepartment);

    /**
     * @Description 通过id删除部门信息
     * @param id
     * @return void
     * @Date 2020/11/8 17:22
     * @Author wangyl
     * @Version V1.0
     */
    void deleteDepartment(long id);

    /**
     * @Description 通过父Id获取所有部门树
     * @param parentId
     * @return java.util.List<com.wyl.xue.admin.system.vo.DepartmentTree>
     * @Date 2020/11/8 17:25
     * @Author wangyl
     * @Version V1.0
     */
    List<DepartmentTree> getDepartmentTree(long parentId);

    /**
     * @Description 通过父级id分页获取子部门
     * @param parentId
     * @param page
     * @param size
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.wyl.xue.admin.system.mybatis.entity.SystemDepartment>
     * @Date 2020/11/8 17:27
     * @Author wangyl
     * @Version V1.0
     */
    IPage<SystemDepartment> getSubdirectoryDepartmentByParentIdForPage(long parentId, int page, int size);

    /**
     * @Description 获取部门下的所有子部门id
     * @param parentId
     * @return java.util.List<java.lang.Long>
     * @Date 2020/11/13 17:34
     * @Author wangyl
     * @Version V1.0
     */
    List<Object> getDepartmentAllChildNodes(long parentId);


    /**
     * @Description 搜索部门
     * @param departmentInfoVo
     * @return java.util.List<com.wyl.xue.admin.system.mybatis.entity.SystemDepartment>
     * @Date 2020/11/21 22:23
     * @Author wangyl
     * @Version V1.0
     */
    List<SystemDepartment> searchDepartment(DepartmentInfoVo departmentInfoVo);

}
